package icraf.carbon.gui;

import javax.swing.AbstractListModel;
import javax.swing.table.AbstractTableModel;

public class NumberRowHeader extends AbstractListModel<Object> {
	private static final long serialVersionUID = 729158709801422L;
	AbstractTableModel table;

	public void fireContentChange(int n) {
		fireContentsChanged(this, 0, n-1);
	}

	public NumberRowHeader(AbstractTableModel table) {
		this.table = table;
	}

	public Object getElementAt(int index) {
		return String.valueOf(index+1);
	}

	public int getSize() {
		return table.getRowCount();
	}
}